package com.itfitness.filter.bean;

import android.hardware.Camera;
import android.support.annotation.NonNull;

/**
 * @ProjectName: LicenseOcr
 * @Package: com.itfitness.licenseocr
 * @ClassName: CameraSizeBean
 * @Description: java类作用描述 存储Camera支持的Size以及宽高的比值与自定义相机所展示的宽高的比值的差值（取差值最小的防止拉伸）
 * @Author: 作者名
 * @CreateDate: 2021/4/4 17:51
 * @UpdateUser: 更新者：itfitness
 * @UpdateDate: 2021/4/4 17:51
 * @UpdateRemark: 更新说明：
 * @Version: 1.0
 */
public class CameraSizeBean implements Comparable<CameraSizeBean>{
    private Camera.Size size;
    private double offsetScale;

    public CameraSizeBean(Camera.Size size, double offsetScale) {
        this.size = size;
        this.offsetScale = offsetScale;
    }

    public Camera.Size getSize() {
        return size;
    }

    public void setSize(Camera.Size size) {
        this.size = size;
    }

    public double getOffsetScale() {
        return offsetScale;
    }

    public void setOffsetScale(double offsetScale) {
        this.offsetScale = offsetScale;
    }

    @Override
    public int compareTo(@NonNull CameraSizeBean o) {
        if(offsetScale > o.getOffsetScale()){
            return 1;
        }else {
            return -1;
        }
    }
}
